/*
 * RGFeatureDetection.h
 *
 *  Created on: Jan 26, 2014
 *      Author: stepgalvao
 */

#ifndef RGFEATUREDETECTION_H_
#define RGFEATUREDETECTION_H_

#include "opencv2/core/core.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/nonfree/features2d.hpp"

using namespace cv;

class RGFeatureDetection {

	static const int FEATURES_NUM = 2;
	static const double FEATURES_QUALITY = 0.3;
	static const double FEATURES_DST = 10;
	static const double FEATURES_BLOCK_SIZE = 3;
private:
	Mat img;
	Size imgSize;
	Ptr<FeatureDetector> detector;
	vector<KeyPoint> keyPoints;


	KeyPoint IdentifyTopFeature(Point2f top, Point2f bottom);
	KeyPoint IdentifyBottomFeature(Point2f top, Point2f bottom);
public:
	RGFeatureDetection();
	RGFeatureDetection(Mat img);
	virtual ~RGFeatureDetection();
	vector<KeyPoint> GetFeatures();
	void IdentifyFeatures();

};

#endif /* RGFEATUREDETECTION_H_ */
